package com.dd.cloud.user.req.admin;

import com.dd.cloud.common.annotate.validation.Name;
import com.dd.cloud.common.annotate.validation.Password;
import com.dd.cloud.common.annotate.validation.Phone;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 管理员用户
 * </p>
 *
 * @author czg
 * @since 2022-04-27
 */
@Data
public class UpdateAdminUserReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "id不能为空")
    private Integer id;

    /**
     * 账号
     */
    @NotBlank(message = "账号不能为空")
    private String account;

    /**
     * 手机号
     */
    @Phone
    private String phone;

    /**
     * 管理员密码
     */
    @Password(required = false)
    private String password;

    /**
     * 确认密码
     */
    @Password(required = false)
    private String resPwd;

    /**
     * 管理员昵称
     */
    @NotBlank(message = "管理员昵称不能为空")
    @Name(begin = "昵称")
    private String nickName;

    /**
     * 角色id
     */
    private Integer roleId;
}
